From 769b15c29b01764f7ef8b6196e79f7ca6206f5cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 26 Sep 2020 10:00:34 +0200 Subject: [PATCH] colorplane: Remove (un)realize handlers Creating the texture in realize() is unnecessary these days, since we can just rely on size_allocate to do that. --- gtk/gtkcolorplane.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index fa08611111..a6fa75c795 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -183,24 +183,6 @@ plane_size_allocate (GtkWidget *widget, create_texture (widget); } -static void -plane_realize (GtkWidget *widget) -{ - GTK_WIDGET_CLASS (gtk_color_plane_parent_class)->realize (widget); - - create_texture (widget); -} - -static void -plane_unrealize (GtkWidget *widget) -{ - GtkColorPlane *plane = GTK_COLOR_PLANE (widget); - - g_clear_object (&plane->texture); - - GTK_WIDGET_CLASS (gtk_color_plane_parent_class)->unrealize (widget); -} - static void set_cross_cursor (GtkWidget *widget, gboolean enabled) @@ -502,8 +484,6 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class) widget_class->snapshot = plane_snapshot; widget_class->size_allocate = plane_size_allocate; - widget_class->realize = plane_realize; - widget_class->unrealize = plane_unrealize; g_object_class_install_property (object_class, PROP_H_ADJUSTMENT, -- 2.30.2